import request from "@/utils/request"

export default {
  // 业绩指标
  performanceIndicator(params) {
    return request({
      url: `/homepage/performance-indicator`,
      method: "get",
      params,
    })
  },
  // 业绩指标 new
  kpiUserCenter(params) {
    return request({
      url: `/base/kpi/user-center`,
      method: "get",
      params,
    })
  },

  // 待发货订单
  toBeDelivered(params) {
    return request({
      url: `/homepage/to-be-delivered`,
      method: "get",
      params,
    })
  },

  // 待处理订单
  toBeHandle(params) {
    return request({
      url: `/homepage/to-be-handle`,
      method: "get",
      params,
    })
  },
  // 销售额销量统计
  homepageStat(data) {
    return request({
      url: `/homepage/stat`,
      method: "POST",
      data,
    })
  },

  // 店铺排行
  shopRanking(params) {
    return request({
      url: `/homepage/shop-ranking`,
      method: "get",
      params,
    })
  },
  // 商品排行
  goodsRanking(params) {
    return request({
      url: `/homepage/goods-ranking`,
      method: "get",
      params,
    })
  },
  // 销售人员排行
  salesRanking(params) {
    return request({
      url: `/homepage/sales-ranking`,
      method: "get",
      params,
    })
  },

  // 平台销售明细
  platformSalesDetails(data) {
    return request({
      url: `/homepage/platform-sales-details`,
      method: "POST",
      data,
    })
  },
}
